<template>
    <div>
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item   v-for="(item,index) of imgList" :key="index">
          <img v-if="item.type==='image'" width="100%" :src="item.src" alt="">
          <video width="100%" controls v-else :src="item.src"></video>
        </van-swipe-item>
      </van-swipe>
    </div>
</template>

<script>
    export default {
      name: "swipe",
      props:{
        imgList:{
          type:Array,
          default:false
        }
      }
    }
</script>

<style scoped>
  .my-swipe{
    height: 180px;
  }
</style>
